<?php

function retrieve_kas_penjualan_data(&$data, $kode){    
    $CI = &get_instance();
    $kode = $CI->security->xss_clean($kode);
    $result = $CI->model_kas_penjualan->getKasPenjualanData("WHERE k.id_dp = '". mysql_escape_string($kode)."'");
    $row = $result->row();

    $data["id_dp"] = $row->id_dp;
    $data["tanggal_dp"] = $row->tanggal_dp;
    $data["keterangan"] = $row->keterangan;
    $data["id_item"] = $row->item_dp;
    $data["nama_item"] = $row->nama_item;
    $data["quantity_dp"] = $row->quantity_dp;
    $data["harga_beli_dp"] = $row->harga_beli_dp;
    $data["harga_jual_dp"] = $row->harga_jual_dp;
    $data["currency"] = $row->currency;
    $data["diskon_dp"] = $row->diskon_dp;
    $data["submitter_dp"] = $row->submitter_dp;
    $data["nama_karyawan"] = $row->nama_karyawan;
    $data["date_created_dp"] = $row->date_created_dp;
    $data["id_sjkp"] = $row->id_sjkp;
    $data["nama_sjkp"] = $row->nama_sjkp;    
    $data["nama_jkp"] = $row->nama_jkp;
}

function retrieve_kas_operasional_data(&$data, $kode){
    $CI = &get_instance();
    $kode = $CI->security->xss_clean($kode);
    $result = $CI->model_kas_operasional->getKasOperasionalData("WHERE k.id_ko = '". mysql_escape_string($kode)."'");
    $row = $result->row();

    $data["id_ko"] = $row->id_ko;
    $data["tanggal_ko"] = $row->tanggal_ko;
    $data["bukti_kas"] = $row->bukti_kas;
    $data["kas_masuk_ko"] = $row->kas_masuk_ko;
    $data["kas_keluar_ko"] = $row->kas_keluar_ko;
    $data["keterangan_ko"] = $row->keterangan_ko;
    $data["submitter_ko"] = $row->submitter_ko;
    $data["date_created_ko"] = $row->date_created_ko;
    $data["nama_karyawan"] = $row->nama_karyawan;
    $data["nama_sjko"] = $row->nama_sjko;
    $data["id_sjko"] = $row->id_sjko;
    $data["nama_jko"] = $row->nama_jko;
}

?>
